package com.woniuxy.cloud.demo;


/**
 * 返回接口，前端返回结果都用这个返回
 */
public class Result<T> {
    private Integer code;
    private String msg;
    private T data;

    public Integer getCode() {
        return code;
    }

    public Result setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public Result setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public Result setData(T data) {
        this.data = data;
        return this;
    }

    public static <T> Result<T> newInstance() {
        Result re = new Result();
        re.setCode(200);
        re.setMsg("访问成功");
        return re;
    }


}
